<template>
  <div class="heading">
    <div class="img-wrapper">
      <img
        src="http://chst.vip:8081/todolist/static/media/logo.dc230d7c3cb96c91409eaedab952337e.svg"
        alt=""
        height="80"
      />
    </div>
    <div class="title">To-Do List</div>
  </div>
  <div class="form-field">
    <h1 class="title">~开始写代码了~</h1>
    <div class="form-wrapper">
      <div class="form-input">
        <input type="text" placeholder="添加要做的事儿..." v-model="val" />
      </div>
      <button type="submit" class="submit-btn" @click="handleAdd">
        <span>提交</span>
      </button>
    </div>
  </div>
</template>
<script setup>
import { ref, defineEmits } from "vue";
let val = ref("");
let emits = defineEmits(["add"]);
let handleAdd = () => {
  emits("add", val);
};
</script>
<style scoped></style>
